<%= render :partial => 'admin/shared/product_sub_menu' %>

<div class='toolbar'>
  <ul class='actions'>
    <li id="new_ot_link">
      <%= button_link_to_remote t("new_option_type"), 
                         {:url => new_admin_option_type_url, 
                         :method => :get,
                         :update => "option-types",
                         :before => "Element.hide('new_ot_link');Element.show('busy_indicator')", 
                         :complete => "Element.hide('busy_indicator')"}, :icon => 'add' %>
    </li>
  </ul>
  <br class='clear' />
</div>

<h1><%= t("option_types") %></h1>

<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
<div id="option-types"></div>

<table class="index">
	<tr>
		<th><%= t("name") %></th>
		<th><%= t("presentation") %></th>
    <th></th>
	</tr>
  <% @option_types.each do |option_type| %>
    <tr>
      <td><%= option_type.name %></td>
      <td><%= option_type.presentation %></td>
	    <td class="actions">
	      <%= link_to_edit(option_type) %>
	      &nbsp;
	      <%= link_to_delete(option_type) %>
	    </td>        
    </tr>
  <% end %>
</table>
